home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 21 / AACD 21.iso / AACD / Programming / amigatalk / intuition / WindowFlags.st < prev    next >
Encoding:
Text File  |  2001-02-28  |  2.5 KB  |  65 lines

  1. " ------------------------------------------------------------------- "
  2. " WindowFlags Class is a Singleton class that allows the user to      "
  3. " reference Window Flags without having to remember their actual      "
  4. " hexadecimal values.                                                 "
  5. " ------------------------------------------------------------------- "
  6.  
  7. Class WindowFlags :Dictionary ! uniqueInstance !
  8. [
  9.    privateNew ! newinstance !
  10.      newinstance <- super new.
  11.  
  12.      ^ newinstance
  13. |
  14.    new
  15.      ^ (self privateSetup)
  16. |
  17.    privateSetup
  18.      (uniqueInstance isNil)
  19.        ifTrue: [uniqueInstance <- self privateNew.
  20.  
  21.                 self at: #WFLG_SIZEGADGET     put: 1.
  22.                 self at: #WFLG_DRAGBAR        put: 2.
  23.                 self at: #WFLG_DEPTHGADGET    put: 4.
  24.                 self at: #WFLG_CLOSEGADGET    put: 8.
  25.  
  26.                 self at: #WFLG_REFRESHBITS    put: 16rC0. "For masking"
  27.                 self at: #WFLG_SIZEBRIGHT     put: 16r10.
  28.                 self at: #WFLG_SIZEBBOTTOM    put: 16r20.
  29.  
  30.                 self at: #WFLG_SMART_REFRESH  put: 0.
  31.                 self at: #WFLG_SIMPLE_REFRESH put: 16r40.
  32.                 self at: #WFLG_SUPER_BITMAP   put: 16r80.
  33.                 self at: #WFLG_OTHER_REFRESH  put: 16rC0.
  34.  
  35.                 self at: #WFLG_BACKDROP       put: 16r100.
  36.                 self at: #WFLG_REPORTMOUSE    put: 16r200.
  37.                 self at: #WFLG_GIMMEZEROZERO  put: 16r400.
  38.                 self at: #WFLG_BORDERLESS     put: 16r800.
  39.  
  40.                 self at: #WFLG_ACTIVATE       put: 16r1000.
  41.  
  42.                 self at: #WFLG_RMBTRAP        put: 16r10000.
  43.                 self at: #WFLG_NOCAREREFRESH  put: 16r20000.
  44.                 self at: #WFLG_NW_EXTENDED    put: 16r40000.
  45.  
  46.                 self at: #WFLG_NEWLOOKMENUS   put: 16r200000.
  47.  
  48.                 self at: #WFLG_VISITOR        put: 16r8000000.
  49.                 self at: #WFLG_ZOOMED         put: 16r10000000.
  50.                 self at: #WFLG_HASZOOM        put: 16r20000000.
  51.  
  52.                "These flags are set only by Intuition.  
  53.                 YOU MAY NOT SET THEM YOURSELF!"
  54.  
  55.                 self at: #WFLG_WINDOWACTIVE   put: 16r2000.
  56.                 self at: #WFLG_INREQUEST      put: 16r4000.
  57.                 self at: #WFLG_MENUSTATE      put: 16r8000.
  58.                 self at: #WFLG_WINDOWREFRESH  put: 16r1000000.
  59.                 self at: #WFLG_WBENCHWINDOW   put: 16r2000000.
  60.                 self at: #WFLG_WINDOWTICKED   put: 16r4000000.
  61.                ].
  62.                
  63.      ^ self "uniqueInstance??"
  64. ]
  65.